﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Undsf.RmmvDbms.Attribute;
using Undsf.RmmvDbms.Data.Internal;

namespace Undsf.RmmvDbms.Data
{
    [Entity(Name = "角色")]
    class Actor
    {
        [EntityField(Index = 0, Name = "编号", BasicType = EntityField.BasicTypeInteger)]
        public int id { get; set; }

        [EntityField(Index = 1, Name = "战斗图", BasicType = EntityField.BasicTypeString)]
        public string battlerName { get; set; }

        [EntityField(Index = 2, Name = "行走图 - 序号", BasicType = EntityField.BasicTypeInteger)]
        public int characterIndex { get; set; }

        [EntityField(Index = 3, Name = "行走图 - 名称", BasicType = EntityField.BasicTypeString)]
        public string characterName { get; set; }

        [EntityField(Index = 4, Name = "职业", BasicType = EntityField.BasicTypeObjectId, ObjectType = EntityField.ObjectTypeClass)]
        public int classId { get; set; }

        [EntityField(Index = 5, Name = "初始装备", BasicType = EntityField.BasicTypeList, ObjectType = EntityField.ObjectTypeEquip)]
        public List<int> equips{ get; set; }

        [EntityField(Index = 6, Name = "脸图 - 序号", BasicType = EntityField.BasicTypeInteger)]
        public int faceIndex { get; set; }

        [EntityField(Index = 7, Name = "脸图 - 文件", BasicType = EntityField.BasicTypeString)]
        public string faceName { get; set; }

        [EntityField(Index = 9, Name = "特性", BasicType = EntityField.BasicTypeList, ObjectType = EntityField.ObjectTypeTrait)]
        public List<Trait> traits { get; set; }

        [EntityField(Index = 10, Name = "初始等级", BasicType = EntityField.BasicTypeInteger)]
        public int initialLevel { get; set; }

        [EntityField(Index = 11, Name = "最高等级", BasicType = EntityField.BasicTypeInteger)]
        public int maxLevel { get; set; }

        [EntityField(Index = 12, Name = "名称", BasicType = EntityField.BasicTypeString)]
        public string name { get; set; }

        [EntityField(Index = 13, Name = "昵称", BasicType = EntityField.BasicTypeString)]
        public string nickname { get; set; }

        [EntityField(Index = 14, Name = "备注", BasicType = EntityField.BasicTypeString)]
        public string note { get; set; }

        [EntityField(Index = 15, Name = "简介", BasicType = EntityField.BasicTypeString)]
        public string profile { get; set; }

        public override string ToString()
        {
            return string.Format("{0:D4}  {1}", id, name);
        }
    }
}
